<%@ Page Language="C#" MasterPageFile="~/Frame.Master" AutoEventWireup="true" Inherits="BaseSystem.UserLoginLog"
    Codebehind="UserLoginLog.aspx.cs" Title="Set User Login Log" %>

<%@ Register Assembly="Auto.WebControls" Namespace="Auto.WebControls" TagPrefix="asp" %>
<%@ Import Namespace="Auto.Data.Setting" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentMain" runat="server">
    <div style="padding-left:2px;">
        <asp:GridViewEx ID="GridViewEx1" runat="server" AutoGenerateColumns="False" AllowSorting="True"
            AllowPaging="true"  OnBindFun="BindGridView" PageSize="20">
            <footerstyle cssclass="GridViewFooterStyle" />
            <columns>
                <asp:TemplateField HeaderText="<%$ Resources:Base,LoginTime %>" SortExpression="LoginTime">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem, LoginLog.FIELD_LoginTime).ToString()%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Base,LogoutTime %>" SortExpression="LogoutTime">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem,LoginLog.FIELD_LogoutTime).ToString() %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Base,UserPCIP %>" SortExpression="UserPCIP">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem,LoginLog.FIELD_UserPCIP).ToString() %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Base,UserPCName %>" SortExpression="UserPCName">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem,LoginLog.FIELD_UserPCName).ToString() %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Base,LogoutType %>" SortExpression="LogoutType">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem,LoginLog.FIELD_LogoutType).ToString() %>
                    </ItemTemplate>
                </asp:TemplateField>
            </columns>
            <rowstyle cssclass="GridViewRowStyle" />
            <editrowstyle cssclass="GridViewEditRowStyle" />
            <selectedrowstyle cssclass="GridViewSelectedRowStyle" />
            <pagerstyle cssclass="GridViewPagerStyle" />
            <headerstyle cssclass="GridViewHeaderStyle" />
            <alternatingrowstyle cssclass="GridViewAlternatingRowStyle" />
            <lockheadersetting height="800px" support="False" width="" />
            <custompage customsupport="False" displaytype="DropDownList" position="Top" selfmotion="True">
            </custompage>
            <resizeheader support="False" />
            <trimlongstrsetting maxlength="100" support="False" />
            <autosortsetting autosort="True" sorttip="" />
            <customcolumns>
                <RadioButtonColumn Align="Left" Position="0" Priority="0" Visible="False" Width="0" />
                <NumberColumn Align="Left" Position="0" Priority="0" Visible="False" Width="0" />
                <MultiChooseColumn Align="Left" Position="0" Priority="0" Visible="False" Width="0" />
            </customcolumns>
            <exportsetting exportexcel="False" exportfilename="exportedgv" exportpdf="False"
                exportword="False" sepeater="&amp;nbsp;||&amp;nbsp;" showcopyright="True" visible="False">
            </exportsetting>
            <mousebehavior mouseovercolor="#d8e7b0" support="False" />
        </asp:GridViewEx>
        <div id="loginLog">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="GridViewStyle"
                AllowPaging="True" OnDataBound="GridView1_DataBound" PageSize="10">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <%=Resources.Base.LoginTime %>
                            </span>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, LoginLog.FIELD_RecID).ToString()%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <span onclick="OrderBy('LoginTime')">
                                <%=Resources.Base.LoginTime %>
                                </span>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, LoginLog.FIELD_LoginTime).ToString()%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <span onclick="OrderBy('LogoutTime')">
                                <%=Resources.Base.LogoutTime%>
                            </span>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem,LoginLog.FIELD_LogoutTime).ToString() %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <span onclick="OrderBy('UserPCIP')">
                                <%=Resources.Base.UserPCIP%>
                            </span>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem,LoginLog.FIELD_UserPCIP).ToString() %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <span onclick="OrderBy('UserPCName')">
                                <%=Resources.Base.UserPCName %>
                            </span>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem,LoginLog.FIELD_UserPCName).ToString() %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <span onclick="OrderBy('LogoutType')">
                                <%=Resources.Base.LogoutType %>
                            </span>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem,LoginLog.FIELD_LogoutType).ToString() %>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <RowStyle CssClass="GridViewRowStyle" />
                <EditRowStyle CssClass="GridViewEditRowStyle" />
                <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
                <PagerStyle CssClass="GridViewPagerStyle" />
                <HeaderStyle CssClass="GridViewHeaderStyle" />
                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                <PagerTemplate>
                    <div id="divPage" runat="Server">
                    </div>
                </PagerTemplate>
            </asp:GridView>
        </div>
    </div>

    <script type="text/javascript" src="_System/Script/Ajax.js"></script>

    <script type="text/javascript">
    function Pager(pageIndex)
    {  
        
//        var curIndex=pageIndex%10;
//        if(curIndex==0)
//        {
//            document.getElementById("Pager"+10).style.color='red';
//            for(i=1;i<10;i++)
//            {
//                document.getElementById("Pager"+i).style.color='blue';
//            }
//        }
//        else
//        {     
//        

//            for(i=1;i<11;i++)
//            {
//                if(curIndex==i)
//                {
//                    
//                    document.getElementById("Pager"+curIndex).style.color='red';
//                }
//                else
//                {
//                    document.getElementById("Pager"+i).style.color='blue';
//                }
//            }
//        }



       GetPager(pageIndex,'<%=divClientID %>',"loginLog");
//       
//       var linkobj=document.getElementsByTagName("a");
//       for(i=0;i<linkobj.length;i++)
//       {
//          alert(linkobj[i]);
//       }

//        if(pageIndex%10!=1)
//        {

//            
//            if(pageIndex%10!=0)
//            {

//                var i=pageIndex-pageIndex%10+1;
//                for(j=i;j<i+11;j++)
//                {
//                    document.getElementById("Pager"+j).style.color='blue';
//            
//                }
//                document.getElementById("Pager"+pageIndex).style.color='red';
//             }
//             else
//             {
//                var k=pageIndex-9;
//                for(l=k;l<k+10;l++)
//                {
//                    document.getElementById("Pager"+l).style.color='blue';
//                }
//                document.getElementById("Pager"+pageIndex).style.color='red';
//             }
//       }
  
    }
    function RemoveClickEvent(obj)
    {     

        document.getElementById(obj).onclick = null;
    }
    
    </script>

</asp:Content>
